'''
快速排序
'''


def select_sort(list):
    if len(list) <= 1:
        return list
    mid = list[0]
    left = [x for x in list[1:] if x <= mid]
    right = [x for x in list[1:] if x >= mid]

    return select_sort(left) + [mid] + select_sort(right)




if __name__ == '__main__':
    sort = select_sort([29, 24, 25])
    print(sort)

    # bubble_sort([22, 24, 25])
